package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.PersonalBusinessComponentGroupMapper;
import com.ruoyi.business.domain.PersonalBusinessComponentGroup;
import com.ruoyi.business.service.IPersonalBusinessComponentGroupService;

/**
 * 个性化业务组件分组Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-02
 */
@Service
public class PersonalBusinessComponentGroupServiceImpl implements IPersonalBusinessComponentGroupService 
{
    @Autowired
    private PersonalBusinessComponentGroupMapper personalBusinessComponentGroupMapper;

    /**
     * 查询个性化业务组件分组
     * 
     * @param id 个性化业务组件分组主键
     * @return 个性化业务组件分组
     */
    @Override
    public PersonalBusinessComponentGroup selectPersonalBusinessComponentGroupById(Long id)
    {
        return personalBusinessComponentGroupMapper.selectPersonalBusinessComponentGroupById(id);
    }

    /**
     * 查询个性化业务组件分组列表
     * 
     * @param personalBusinessComponentGroup 个性化业务组件分组
     * @return 个性化业务组件分组
     */
    @Override
    public List<PersonalBusinessComponentGroup> selectPersonalBusinessComponentGroupList(PersonalBusinessComponentGroup personalBusinessComponentGroup)
    {
        return personalBusinessComponentGroupMapper.selectPersonalBusinessComponentGroupList(personalBusinessComponentGroup);
    }

    /**
     * 新增个性化业务组件分组
     * 
     * @param personalBusinessComponentGroup 个性化业务组件分组
     * @return 结果
     */
    @Override
    public int insertPersonalBusinessComponentGroup(PersonalBusinessComponentGroup personalBusinessComponentGroup)
    {
        personalBusinessComponentGroup.setCreateTime(DateUtils.getNowDate());
        return personalBusinessComponentGroupMapper.insertPersonalBusinessComponentGroup(personalBusinessComponentGroup);
    }

    /**
     * 修改个性化业务组件分组
     * 
     * @param personalBusinessComponentGroup 个性化业务组件分组
     * @return 结果
     */
    @Override
    public int updatePersonalBusinessComponentGroup(PersonalBusinessComponentGroup personalBusinessComponentGroup)
    {
        personalBusinessComponentGroup.setUpdateTime(DateUtils.getNowDate());
        return personalBusinessComponentGroupMapper.updatePersonalBusinessComponentGroup(personalBusinessComponentGroup);
    }

    /**
     * 批量删除个性化业务组件分组
     * 
     * @param ids 需要删除的个性化业务组件分组主键
     * @return 结果
     */
    @Override
    public int deletePersonalBusinessComponentGroupByIds(Long[] ids)
    {
        return personalBusinessComponentGroupMapper.deletePersonalBusinessComponentGroupByIds(ids);
    }

    /**
     * 删除个性化业务组件分组信息
     * 
     * @param id 个性化业务组件分组主键
     * @return 结果
     */
    @Override
    public int deletePersonalBusinessComponentGroupById(Long id)
    {
        return personalBusinessComponentGroupMapper.deletePersonalBusinessComponentGroupById(id);
    }
}
